<?php
namespace app\console\controller;
use app\model\News as SelfModel;
use app\model\NewsType;

use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Request;
use think\facade\Route;
use think\facade\View;
use think\facade\Db;
use think\facade\Cache;
use think\facade\Cookie;
class News extends Base
{



    public function initialize()
    {
        parent::initialize();
        $this->model = "\app\model\News";
        $this->list_rows = 100;
        
    }
    public function select()
    {
            $news_type = NewsType::where([['status', '=', 1]])->order(['sort' => 'asc', 'id' => 'desc'])->select()->toArray();
            View::assign('news_type', $news_type);

    }





}